package com.yuke.cloud.service.pmc.dao;

import com.yuke.cloud.common.core.mybatis.MyMapper;
import com.yuke.cloud.service.api.pmc.dto.ProdCategoryDto;
import com.yuke.cloud.service.api.pmc.dto.ProdSpecApiDto;
import com.yuke.cloud.service.pmc.dto.CategoryDto;
import com.yuke.cloud.service.pmc.dto.ProdCategoryBrandDto;
import com.yuke.cloud.service.pmc.entity.ProdCategory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProdCategoryMapper extends MyMapper<ProdCategory> {
    int isEnable(@Param("list") List<Long> categoryIds, @Param("isEnable") Integer isEnable);
    List<CategoryDto> findAllEnableList(@Param("saleType") Byte saleType);
    List<CategoryDto> findAllList();
    CategoryDto findInfoById(Long id);
    List<Long> getSubCategorysByParent(Long parentCategoryId);
    //PmcSpecFeignApi
    ProdCategoryDto getCategoryBySpecId(Long specId);
    List<ProdCategoryDto> getCategorysBySpecIds(List<Long> specIds);
    List<ProdCategoryDto> getParentCategoryByCategoryIds(List<Long> categoryIds);
    ProdCategoryDto getCategoryByCategoryId(Long categoryId);
    List<ProdCategoryBrandDto> getProdCategoryBrand(@Param("prodCategoryBrandDto")ProdCategoryBrandDto prodCategoryBrandDto);
    List<CategoryDto> getFindCategory(@Param("categoryType")Byte categoryType);
    List<ProdCategoryBrandDto> getProdBrandCategory(@Param("prodCategoryBrandDto")ProdCategoryBrandDto prodCategoryBrandDto);

    List<ProdSpecApiDto> findParent(List<Long> list);
}
